﻿using Basic.FormGatewaryModular.Interface;
using Basic.FormRemoteModel.Column.Model;
using Basic.FormRemoteModel.QueryColumn;
using Basic.FormRemoteModel.QueryColumn.Model;

namespace Basic.FormGatewaryModular.Services
{
    internal class PhyQueryColumnService : IPhyQueryColumnService
    {
        public long Add ( QueryColumnAdd add )
        {
            return new AddPhyQueryColumn
            {
                Datum = add
            }.Send();
        }

        public void Delete ( long id )
        {
            new DeletePhyQueryColumn
            {
                Id = id
            }.Send();
        }

        public QueryColumnDto Get ( long id )
        {
            return new GetPhyQueryColumn
            {
                Id = id
            }.Send();
        }

        public bool Set ( long id, QueryColumnSet set )
        {
            return new SetPhyQueryColumn
            {
                Id = id,
                Datum = set
            }.Send();
        }

        public bool SetSort ( QueryColSet set )
        {
            return new SetPhyQueryColumnSort
            {
                Sort = set
            }.Send();
        }
    }
}
